function C57_CPP_Plot_Mean_XDay_ER_Matrix(XDay_ER_Matrix)
%% prepare data

matrix = cat(3, XDay_ER_Matrix.C57_5, XDay_ER_Matrix.C57_6, XDay_ER_Matrix.C57_7, XDay_ER_Matrix.C57_8);

for n = 1:size(matrix,1)
    for m = 1:size(matrix,2)
        XDay_ER(n,m) = mean(matrix(n,m,:));
    end
end

%% plotting

figure
heatmap(XDay_ER,'CellLabelColor','none'); 
colormap jet; 
Ax = gca;
Ax.XDisplayLabels = nan(size(Ax.XDisplayData));
Ax.YDisplayLabels = nan(size(Ax.YDisplayData));
caxis([0, 0.5]);
title('Cross-Day ERcorr Matrix')
set(gca,'FontSize',20);

end